//============================================================================
// Name        : finalTestCurlScp.cpp
// Author      : alex2stf
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================




#include "stn/stn_libssh_shorts.h"

using namespace std;



void copyToRemote(ssh_session session, ssh_scp scp){
	scp_create_dir_and_file(session, scp, "newDirectory/newdir", "demo.txt", "my new file");
}

void conectToWrite(ssh_session session){
	scp_connectToWrite(session, "/usr/local/apache-tomcat-6.0.35/webapps/ROOT/js/privateShow", &copyToRemote);
}


void useReadData(ssh_session session, ssh_scp scp){
	scp_receiveData(session, scp);
}

void testToDoAfterConnection(ssh_session session){
	cout << "SE APELEAZA DUPA CONEXIUNE" <<endl;
	scp_readFile(session,  "/usr/local/apache-tomcat-6.0.35/webapps/ROOT/js/broadcaster/cam4Broadcast_20130620034826.js", &useReadData);
}

int main() {
	stn_connectToRemoteServer("10.8.3.69", "smartx00x", SSH_LOG_PROTOCOL, 22, &conectToWrite);
	//stn_connectToRemoteServer(REMOTE_HOST, &password, &verbosity, &port, &test);


	return 0;
}
